<template>
  <a-modal
    v-model:open="visible"
    :mask-closable="false"
    width="80%"
    title="会员卡券"
    :style="{ top: '20px' }"
    :footer="null"
    destroyOnClose
  >
    <member-coupon-grid :member-id="memberId" />
  </a-modal>
</template>

<script setup>
  import { getCurrentInstance, ref } from 'vue';
  import MemberCouponGrid from '@/views/base-data/member-coupon/member-coupon-grid.vue';

  // this对象
  const instance = getCurrentInstance();

  // 弹窗是否可见
  const visible = ref(false);

  // 组件参数
  const props = defineProps({
    // 会员ID
    memberId: {
      type: String,
      required: true,
    },
  });

  // 打开弹窗
  const openDialog = () => {
    visible.value = true;
  };

  // 组件实例对象
  const _This = () => {
    return instance.appContext.config.globalProperties;
  };

  defineExpose({
    openDialog,
  });
</script>

<style scoped></style>
